.editor-container {
  min-height: 100vh;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: sans-serif;
}

.ProseMirror {
  padding: 20px;
  min-height: 300px;
  outline: none;

  .notion-paragraph-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin: 0;
    padding: 3px 0;
    min-height: 1.5em;
    transition: all 0.2s ease;

    &:hover {
      background-color: rgba(0, 0, 0, 0.02);

      .add-paragraph-btn,
      .drag-handle {
        opacity: 0.6;
      }
    }

    &.has-focus {
      background-color: rgba(0, 0, 0, 0.05);

      .add-paragraph-btn,
      .drag-handle {
        opacity: 1;
      }
    }

    &.is-dragging {
      opacity: 0.5;
      background-color: rgba(0, 0, 0, 0.05);
    }

    &.drag-over-top {
      border-top: 2px solid #1a73e8;
      margin-top: -2px;
    }

    &.drag-over-bottom {
      border-bottom: 2px solid #1a73e8;
      margin-bottom: -2px;
    }

    .add-paragraph-btn,
    .drag-handle {
      position: relative;
      width: 24px;
      height: 24px;
      padding: 0;
      margin: 0;
      border: none;
      background: none;
      cursor: pointer;
      opacity: 0;
      transition: opacity 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #999;

      &:hover {
        color: #1a73e8;
        opacity: 1;
      }

      i {
        font-size: 16px;
      }
    }

    .drag-handle {
      cursor: grab;
      
      &:active {
        cursor: grabbing;
      }
    }

    .add-paragraph-btn {
      margin-right: 4px;
    }

    .notion-paragraph {
      flex: 1;
      margin: 0;
      padding: 3px 10px;
      min-height: 24px;
    }
  }

  p.is-empty::before {
    content: attr(data-placeholder);
    color: #adb5bd;
    pointer-events: none;
    height: 0;
    float: left;
  }

  ul,
  ol {
    padding-left: 1.2em;
    margin: 0;
  }

  h1 {
    font-size: 2em;
    font-weight: 600;
    line-height: 1.3;
  }

  h2 {
    font-size: 1.5em;
    font-weight: 500;
    line-height: 1.3;
  }

  code {
    background-color: rgba(#616161, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
    font-family: 'SF Mono', Monaco, Menlo, Consolas, 'Ubuntu Mono', monospace;
  }

  pre {
    background: #0d0d0d;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;

    code {
      color: inherit;
      padding: 0;
      background: none;
    }
  }

  blockquote {
    margin: 0;
    padding-left: 1rem;
    border-left: 3px solid #999;
    color: #666;
  }

  hr {
    border: none;
    border-top: 2px solid #eee;
    margin: 1rem 0;
  }
}

.notion-style-editor {
  &.dragging-active {
    user-select: none;
    * {
      user-select: none;
    }
  }
}

.notion-paragraph-wrapper {
  position: relative;
  padding: 3px 0 3px 40px;
  transition: opacity 0.2s ease;

  &.is-dragging {
    opacity: 0.5;
    cursor: move;
  }

  &.drag-over-top {
    position: relative;
    &::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: 2px;
      background-color: #1677ff;
      z-index: 1;
    }
  }

  &.drag-over-bottom {
    position: relative;
    &::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 2px;
      background-color: #1677ff;
      z-index: 1;
    }
  }

  &:hover {
    background-color: rgba(0, 0, 0, 0.02);

    .add-paragraph-btn,
    .drag-handle {
      opacity: 0.6;
    }
  }

  &.has-focus {
    background-color: rgba(0, 0, 0, 0.05);

    .add-paragraph-btn,
    .drag-handle {
      opacity: 1;
    }
  }

  .add-paragraph-btn,
  .drag-handle {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;

    &:hover {
      color: #1a73e8;
      opacity: 1;
    }

    i {
      font-size: 16px;
    }
  }

  .drag-handle {
    cursor: grab;
    
    &:active {
      cursor: grabbing;
    }
  }

  .add-paragraph-btn {
    margin-right: 4px;
  }

  .notion-paragraph {
    flex: 1;
    margin: 0;
    padding: 3px 10px;
    min-height: 24px;
  }
}

.bubble-menu-group {
  display: flex;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: #fff;

  button {
    border: none;
    box-sizing: border-box;
    background: transparent;
    padding: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a4a4a;

    i {
      font-size: 20px;
    }

    &:hover {
      background: rgba(0, 0, 0, 0.04);
      color: #1a73e8;
    }

    &.is-active {
      background: rgba(26, 115, 232, 0.1);
      color: #1a73e8;
    }
  }
}